package com.mes.material.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mes.material.mapper.MaterialTraceMapper;
import com.mes.material.domain.MaterialTrace;
import com.mes.material.service.IMaterialTraceService;

/**
 * 物料追溯Service业务层处理
 * 
 * @author itflash
 * @date 2025-02-27
 */
@Service
public class MaterialTraceServiceImpl implements IMaterialTraceService 
{
    @Autowired
    private MaterialTraceMapper materialTraceMapper;

    /**
     * 查询物料追溯
     * 
     * @param id 物料追溯主键
     * @return 物料追溯
     */
    @Override
    public MaterialTrace selectMaterialTraceById(Long id)
    {
        return materialTraceMapper.selectMaterialTraceById(id);
    }

    /**
     * 查询物料追溯列表
     * 
     * @param materialTrace 物料追溯
     * @return 物料追溯
     */
    @Override
    public List<MaterialTrace> selectMaterialTraceList(MaterialTrace materialTrace)
    {
        return materialTraceMapper.selectMaterialTraceList(materialTrace);
    }

    /**
     * 新增物料追溯
     * 
     * @param materialTrace 物料追溯
     * @return 结果
     */
    @Override
    public int insertMaterialTrace(MaterialTrace materialTrace)
    {
        return materialTraceMapper.insertMaterialTrace(materialTrace);
    }

    /**
     * 修改物料追溯
     * 
     * @param materialTrace 物料追溯
     * @return 结果
     */
    @Override
    public int updateMaterialTrace(MaterialTrace materialTrace)
    {
        return materialTraceMapper.updateMaterialTrace(materialTrace);
    }

    /**
     * 批量删除物料追溯
     * 
     * @param ids 需要删除的物料追溯主键
     * @return 结果
     */
    @Override
    public int deleteMaterialTraceByIds(Long[] ids)
    {
        return materialTraceMapper.deleteMaterialTraceByIds(ids);
    }

    /**
     * 删除物料追溯信息
     * 
     * @param id 物料追溯主键
     * @return 结果
     */
    @Override
    public int deleteMaterialTraceById(Long id)
    {
        return materialTraceMapper.deleteMaterialTraceById(id);
    }
}
